<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>图书仓库后台管理</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">图书仓库后台管理</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <img src="images/01.jpg" class="layui-nav-img">
            </li>
            <li class="layui-nav-item">
                <button type="button" onclick="logout()" class="layui-btn">退出</button>
            </li>

        </ul>

    </div>


    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;"><i class="fa fa-folder-open-o"></i> 图书管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="pages/booksStorage.html" target="mainManager"><i class="fa fa-book"></i> 图书信息</a>
                        </dd>
                        <dd><a href="pages/putbookStorage.html" target="mainManager"><i class="fa fa-sign-in"></i> 入库管理</a>
                        </dd>
                        <dd><a href="pages/outStorage.html" target="mainManager"><i class="fa fa-sign-out"></i> 出库管理</a>
                        </dd>
                        <dd><a href="pages/outReco.html" target="mainManager"><i class="fa fa-bookmark-o"></i> 出库记录</a>
                        </dd>
                        <dd><a href="pages/putbookReco.html" target="mainManager"><i class="fa fa-bookmark-o"></i> 入库记录</a>
                        </dd>

                    </dl>
                </li>
                <li class="layui-nav-item  layui-nav-itemed">
                    <a href="javascript:;"><i class="fa fa-folder-open-o"></i>系统管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="pages/userManager.html" target="mainManager"><i class="fa fa-user"></i>用户管理</a>
                        </dd>
                        <dd><a href="pages/userStorage.html" target="mainManager"><i class="fa fa-users"></i>人员管理</a>
                        </dd>
                        <dd><a href="pages/suppStorage.html" target="mainManager"><i class="fa fa-address-card-o"></i>供货商</a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body" tar style="padding: 15px;width: 100%;height: 100%">

        <iframe name="mainManager" style="width: 100%;height: 100%" frameborder="0" src="pages/booksStorage.html">
        </iframe>

    </div>

    <div class="layui-footer" style="text-align: center;">
        <!-- 底部固定区域 -->
        © Power&nbsp&nbsp&nbsp&nbsp图书仓库后台管理
    </div>
</div>
<script src="layui/layui.all.js"></script>
<script>

    $(document).ready(function () {

        if(location.href.indexOf("#reloaded")==-1){
            location.href=location.href+"#reloaded";
            location.reload();
        }
    })

    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;

    });

    function logout() {
        var $ = layui.$;
        $.ajax({
            url: 'user/logout',
            success: function () {
                window.location.href = "login.html"
                layui.layer.alert(data.msg, {icon: 1});
            }
        })
    }
</script>
</body>
</html>